import os

dirname = "E:\\learn\\宁浩网-Flutter入门到精通全套(中)\\"
replacename = "cmt"
files = os.listdir(dirname)

for filename in files:
    if filename.find(replacename) != -1:
        print("原文件名：", filename)
        os.remove(dirname + filename)
